var request = require('request');
module.exports = class Hubot{
	constructor() {

	}
	send(user, message){
    	var adapter_url = 'http://127.0.0.1:8080/receive/' + user,
    	form_data = {
    		from: 'XiaoTian',
    		message: message
    	};

    	// 调adapter
    	request.post(adapter_url, {'form': form_data}, function (error, response, body) {
    		console.log('error:', error);
    		console.log('statusCode:', response && response.statusCode);
    		console.log('body:', body);
    	});
	}
}